package com.easipass.framework.eirframeworkwebapp.controller;

import com.easipass.framework.eirframeworkwebapp.service.StreamFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SourceController {

    @Autowired
    private StreamFeignService streamFeignService;

    @RequestMapping("/send/source/{dest}")
    public String send(@PathVariable("dest") String dest,
                       @RequestParam String msg) {
        return streamFeignService.putKafkaMsg(dest,msg);
    }
}
